﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace taskReturnValue
{
        public static class Program
        {

            public static void Main()
            {

                Task<int> t = Task.Run(() =>
                {

                    return 42;

                });

                //Mientras la tarea no haya finalizado no se podra obtener el valor.
                Console.WriteLine(t.Result); // Displays 42
                Console.Read();

            }

        }
}
